package com.dui;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class Frame extends JFrame {
    int width = 1440;
    int height = 900;

    public Frame(){

        this.setSize(width,height);
        //设置窗口在屏幕居中位置
        this.setLocationRelativeTo(null);
        this.setTitle("小堆比大英雄");

        Panel panel = new Panel();
        panel.action();
        add(panel);
        this.setVisible(true);
        //窗口关闭，程序也关闭
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }

    public static void main(String[] args) {
        new Frame();
    }
}
